package com.itheima06;

public class StudentDemo {
    public static void main(String[] args) {

        useStudentBuilder((s, m) -> new Student(s, m));

        // 引用构造器
        useStudentBuilder(Student::new);
    }

    private static void useStudentBuilder(StudentBuilder sb) {
        Student s = sb.build("张三", "19");
        System.out.println(s.getName() + "," + s.getAge());
    }
}
